import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
import router from './router';
const app = createApp(App);

//暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css';

//引入element
// main.ts
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';

//引入封装Axios请求
import Axios from './utils/request';
app.use(Axios);

//使用图标
import iconObj from './utils/icon';
for (const [key, component] of iconObj) {
	app.component(key, component);
}
//pinia
import { createPinia } from 'pinia'
const pinia = createPinia()
//pinia持久化
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
pinia.use(piniaPluginPersistedstate);

app.use(pinia)
// 启用路由
app.use(router);
app.use(ElementPlus);
app.mount('#app');
